package com.example.demo01.domain;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @ClassName Person
 * @Description
 * @Author zhangsw
 * @Date 2021/10/19 22:56
 * @Version 1.0
 */
@Data
@Component
public class Person {

    @Value("${person.name}")
    private String name;

    @Value("${person.age}")
    private Integer age;

    public static void main(String[] args) {
        Map<String, Object> map = new HashMap<>();
        map.put("truePositiveRateByLabel", 0.10370583165756966);
//        map.put("age", 11);
//        map.put("name", "zs");
        System.out.println(map.size());
        String str = map.entrySet()
                .stream()
                .map(e -> e.getKey() + "：" + e.getValue())
                .collect(Collectors.joining("；"));
        System.err.println(str);
    }
}
